{extend name="layout/layout" /}

{block name="pagecss"}
<link href="__STATIC__/admin/pages/css/order.css" rel="stylesheet" type="text/css" />
{/block}

{block name="content"}
<div class="row js-check-wrap">
    <div class="col-lg-12">
        <div class="box box-success">
            <div class="box-header with-border">
                <div class="row">
                    <form id="searchForm" class="form">
                        <div class="form-group col-md-12">
                            <div class="row">
                                <div class="form-group col-md-3">
                                    <div class="form-inline" id="store">
                                        {if condition="$admin.roleType == 2 "}  <!-- 店员登录 -->
                                        <select  name="storeId" id="storeId" class="form-control" disabled>
                                            {volist name="store" id="vo"}
                                            <option value="{$vo.id}" {eq name="vo.id" value="$admin.storeId"}selected{/eq}  ><span>{$vo.name}</span></option>
                                            {/volist}
                                        </select>
                                        {else /}
                                        <select  name="storeId" id="storeId" class="form-control">
                                            {volist name="store" id="vo"}
                                            <option value="{$vo.id}" {eq name="vo.id" value="$storeId"}selected{/eq}  ><span>{$vo.name}</span></option>
                                            {/volist}
                                        </select>
                                        {/if}
                                    </div>
                                </div>
                                <div class="form-group col-md-3">
                                    <div class="form-inline">
                                        <select name="linkType" id="linkType" class="form-control">
                                            <option value="">全部</option>
                                            <option value="0">普通订单</option>
                                            <option value="1">拼团</option>
                                            <option value="2">积分换购</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-md-2" id="dostatus">
                            <select id="status" name="status" class="form-control">
                                <option value="">全部</option>
                                <option value="1">待付款</option>
                                <option value="2">待发货</option>
                                <option value="3">待收货</option>
                                <option value="4">已完成</option>
                                <option value="5" >已失效</option>
                                <option value="6">售后/退款</option>
                                <option value="7">已消费</option>
                                <option value="8">未消费</option>
                            </select>
                        </div>

                        <div class="form-group col-md-4">
                            <div class="form-inline">
                                <div class="input-daterange input-group" id="datepicker">
                                    <span class="input-group-addon">下单时间：</span>
                                    <input type="text" class="form-control" name="begin_time" id="begin_time" style="padding: 0;" />
                                    <span class="input-group-addon">至</span>
                                    <input type="text" class="form-control" name="end_time" id="end_time" style="padding: 0;" />
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-md-2">
                            <input type="text" class="form-control" maxlength="20" name="orderNO" placeholder="订单号">
                        </div>
                        <div class="form-group col-md-2">
                            <button class="btn btn-success cy-pad-rgt-s margin-right-10" id="doQuery" type="button"><i class="fa fa-search"></i> 搜索</button>
                        </div>
                    </form>

                    <div class="form-group col-md-2 pull-right" style="width: 130px;">
                        <button type="button" id="export_csv" data-url="{:url('admin/order/export')}" class="btn bg-navy"><i class="fa  fa-download"></i> 导出数据</button>
                    </div>
                </div>
                <div class="box-tools pull-right">

                </div>
            </div>
            <div class="box-body ">
                <form class="js-ajax-form" method="post">
                    <div class="table-responsive">
                        <table class="table table-striped table-bordered table-hover table-checkable order-column" id="table_order">
                            <thead>
                            <tr>
                                <th>图片</th>
                                <th>订单号</th>
                                <th>商品数量</th>
                                <th>支付方式</th>
                                <th>订单金额(元)</th>
                                <th>收货人</th>
                                <th>手机号</th>
                                <th>下单时间</th>、
                                <th>订单类型</th>
                                <th>订单状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            </tbody>
                        </table>
                    </div>
                    <div class="box-footer">

                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<input type="hidden" class="datalist_url" value="{:url('admin/order/getOrderList')}">
<input type="hidden" class="view_url" value="{:url('admin/order/orderdetails')}">
{/block}

{block name="pagescript"}
<script src="__STATIC__/admin/pages/js/order.js" type="text/javascript"></script>
{/block}